package com.example.web;

import com.example.starter.service.ClassService;
import com.example.starter.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("starter")
public class TestController {


    @Autowired
    private ClassService classService;

    @Value("${student.name}")
    private String name;

    @RequestMapping("hello")
    public StudentService hello() {
        System.out.println(name);
        return classService.print();
    }

}
